package org.six11.ss.client;

import java.util.Map;

import org.six11.util.adt.MultiState;

/**
 * 
 * 
 * @author Gabe Johnson <johnsogg@cmu.edu>
 */
public class LeaveRoomCommandHandler extends CommandHandler {

  /**
   * @param state
   */
  public LeaveRoomCommandHandler(MultiState state) {
    super(state);
  }

  @SuppressWarnings("unchecked")
  public void handleCommand(String args) {
    // just defer to JoinRoomCommandHandler and supply the name of the lobby
    Map<String, CommandHandler> commandHandlers = (Map<String, CommandHandler>) state
        .getValue(ClientStateNames.K_COMMAND_HANDLERS);
    commandHandlers.get("join").handleCommand("The Lobby");
  }
}
